Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export ipfs_p2p metrics like Kubo does #32

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

hsanjuan
Copy link
Contributor

Copy-pasted some code from Kubo.

if c.Node.host == nil {
return vals
}
for _, peerID := range c.Node.host.Network().Peers() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we only want the data transfer peers or, also the DHT peers. Since they are (optionally) on different hosts we may need to check there as well. If both do we want to deduplicate by peerID?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aschmahmann good point.

Now, I would like to compare perf between using a single host and using two hosts. I'm not sure it makes a difference tbh. Would you be ok with using a single host for everything if thunderdome shows it is not worse?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with one host if behavior looks the same (i.e. if it's less complexity for a similar result).

IIUC this metric just tracks the peers we're connected to, not other things like bandwidth. Not sure how those are currently set up given two hosts.

@hacdias hacdias changed the title Export ipfs_p2p metrics like Kubo does feat: export ipfs_p2p metrics like Kubo does Feb 12, 2024
Copy-pasted some code from Kubo
@hacdias hacdias enabled auto-merge (squash) February 12, 2024 15:12
@hacdias hacdias merged commit bf5686f into main Feb 12, 2024
11 checks passed
@hacdias hacdias deleted the ipfs-p2p-metrics branch February 12, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants